from django.conf.urls import url

from .views import RegisterView, LoginView, LogoutView, ForgetPwdView, ResetView, ModifyView, UploadImageView, \
    UserInfoView,MyCourseView,MyFavOrgView,MyMessageView,MyFavTeacherView,MyFavCourseView

urlpatterns = [
    # 路由名为register
    url(r'^register/$', RegisterView.as_view(), name='register'),
    # 路由名为login
    url(r'^login/$', LoginView.as_view(), name='login'),
    # 路由名为logout
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
    # 路由名为forget_pwd
    url(r'^forget/$', ForgetPwdView.as_view(), name='forget_pwd'),
    # 路由名为reset_pwd
    url(r'^reset/(?P<active_code>.*)/$', ResetView.as_view(), name='reset_pwd'),
    # 路由名为modify_pwd
    url(r'^modify/$', ModifyView.as_view(), name='modify_pwd'),
    # ------------------------个人中心-----------------------------------
    # 上获取当前登录用户信息user_info
    url(r'^users/info/$', UserInfoView.as_view(), name='user_info'),
    # 点击修改图片修改头像图片
    url(r'^users/image/upload/$', UploadImageView.as_view(), name='image_upload'),
    # 用户中心------我的课程
    url(r'^users/mycourse/$', MyCourseView.as_view(), name='mycourse'),
    # 用户中心------我的收藏---课程学校
    url(r'^users/myfav/org/$', MyFavOrgView.as_view(), name='myfav_org'),
    # 用户中心------我的收藏---授课教师
    url(r'^users/myfav/teacher/', MyFavTeacherView.as_view(), name='myfav_teacher'),
    # 用户中心------我的收藏---公开课程
    url(r'^myfav/course/$', MyFavCourseView.as_view(), name='myfav_course'),
    # 用户中心------我的消息
    url(r'^users/myfav/course/$', MyMessageView.as_view(), name='mymessage'),
]
